package com.bw.controller;

import com.bw.service.MovieService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class springbootController {
    @Autowired
    MovieService movieService;
    @RequestMapping("/find")
    public List<Map> find() {
        return movieService.find();
    }

    @RequestMapping("/findName")
    public List<Map> findName() {
        return movieService.findName();
    }

    @RequestMapping("/findLike")
    public List<Map> findLike(String name) {
        return movieService.findLike(name);
    }

    @RequestMapping("/findLikeName")
    public List<Map> findLikeName(String name) {
        return movieService.findLikeName(name);
    }

    @RequestMapping("/findTime")
    public List<Map> findTime(String start, String end) {
        return movieService.findTime(start, end);
    }
}
